<!doctype html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml" xmlns:v-on="http://www.w3.org/1999/xhtml" xmlns:v-model="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <link rel="stylesheet" href="../../vender/animate@3.5.0.min.css">
    <style>
        .list-complete-item {
            transition: all 1s;
            border: 1px solid #ccc;
        }
    </style>
</head>
<body>

<div id="app">
    <input v-model.number="number" type="number" step="100">
    <p>{{ animatedNumber }}</p>
</div>


</body>
<script src="../../vender/vue@2.4.2.js"></script>
<script src="https://cdn.jsdelivr.net/npm/tween.js@16.3.4"></script>

<script>
    var app=new Vue({
        el:'#app',
        data:{
            number:100,
            animatedNumber:100
        },
        watch: {
            number:function (newVal,oldVal) {
                var vm=this;
                function animate(){
                    if(TWEEN.update()){
                        requestAnimationFrame(animate);
                    }
                }
                new TWEEN.Tween({tweeningNumber:oldVal})
                        .easing(TWEEN.Easing.Quadratic.Out)
                        .to({tweeningNumber:newVal},500)
                        .onUpdate(function(){
                            vm.animatedNumber=this.tweeningNumber.toFixed(0);
                        })
                        .start();
                animate();
            }
        }
    });

</script>
</html>